class ValCoinListInfoModel {
  String goodsId;
  String code;
  String icon;
  String tags;
  String type;
  int subType;
  double discount;
  double originalPrice;
  double price;
  int exchangeCoin;
  double originalPriceRupee;
  double priceRupee;
  double localPaymentPriceRupee;
  bool isPromotion;
  int localPayOriginalPrice;
  int localPayPrice;

  ValCoinListInfoModel(
      {this.goodsId = '',
        this.code = '',
        this.icon = '',
        this.type = '',
        this.tags = '',
        this.subType = 0,
        this.discount = 0.0,
        this.originalPrice = 0.0,
        this.price = 0.0,
        this.exchangeCoin = 0,
        this.originalPriceRupee = 0.0,
        this.priceRupee = 0.0,
        this.localPaymentPriceRupee = 0.0,
        this.isPromotion = false,
        this.localPayOriginalPrice = 0,
        this.localPayPrice = 0});


  factory ValCoinListInfoModel.fromJson(Map<String, dynamic> json) {
    ValCoinListInfoModel postModel = ValCoinListInfoModel(
      goodsId: json['goodsId'],
      code: json['code'],
      icon: json['icon'],
      type: json['type'],
      tags: json['tags'],
      subType: json['subType'],
      discount: json['discount'] ?? 0,
      originalPrice: json['originalPrice'],
      price: json['price'],
      exchangeCoin: json['exchangeCoin'],
      originalPriceRupee: json['originalPriceRupee'],
      priceRupee: json['priceRupee'],
      localPaymentPriceRupee: json['localPaymentPriceRupee'],
      isPromotion: json['isPromotion'],
      localPayOriginalPrice: json['localPayOriginalPrice'],
      localPayPrice: json['localPayPrice']
    );
    return postModel;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['goodsId'] = goodsId;
    data['code'] = code;
    data['icon'] = icon;
    data['type'] = type;
    data['subType'] = subType;
    data['discount'] = discount;
    data['originalPrice'] = originalPrice;
    data['tags'] = tags;
    data['price'] = price;
    data['exchangeCoin'] = exchangeCoin;
    data['originalPriceRupee'] = originalPriceRupee;
    data['priceRupee'] = priceRupee;
    data['localPaymentPriceRupee'] = localPaymentPriceRupee;
    data['isPromotion'] = isPromotion;
    data['localPayOriginalPrice'] = localPayOriginalPrice;
    data['localPayPrice'] = localPayPrice;
    return data;
  }
}
